package cnsukidayo.com.gitee.controller.content;

import cnsukidayo.com.gitee.model.vo.PetVO;
import cnsukidayo.com.gitee.service.PetService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author sukidayo
 * @date 2023/4/25 15:13
 */
@RestController
@RequestMapping("/content/pet")
public class PetController {

    private PetService petService;

    public PetController(PetService petService) {
        this.petService = petService;
    }

    @ApiOperation("根据宠物ID查询宠物信息")
    @GetMapping(value = "queryPet")
    public PetVO queryPet(@RequestParam int id) {
        return petService.queryPetWithID(id);
    }

}
